﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// 消息监听接口
/// </summary>
public interface IEventListener
{
    /// <summary>
    /// 接收、处理消息
    /// </summary>
    /// <param name="id">消息Id</param>
    /// <param name="param1">参数1</param>
    /// <param name="param2">参数2</param>
    /// <returns>是否终止消息派发</returns>
    bool HandleEvent(int id, object param1, object param2);

    /// <summary>
    /// 消息优先级
    /// </summary>
    /// <returns></returns>
    int EventPriority();

    ///// <summary>
    ///// 注册消息接收,调用EventNodeCore的AttachEventListener
    ///// </summary>
    //void RegisteListener();

    ///// <summary>
    ///// 注销消息接收，调用EventNodeCore的DetachEventListener
    ///// </summary>
    //void Detach();
}

/*
 * 每个物体（玩家、敌人、道具）的所有有触发条件的行动都需要在EventNodeCore注册
 * 其HandleEvent用于接收消息，注意是否中断这个消息的全局广播
 * 所有操作事件执行需给RoundRunner登录，执行完毕需回报RoundRunner
 */
